-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Electron-26 (Auto Launch for Mac) #109
Conversation
@lneir & @VishwasShashidhar Please review. Thanks |
js/main.js
Outdated
@@ -46,7 +46,7 @@ if (shouldQuit) { | |||
|
|||
var symphonyAutoLauncher = new AutoLaunch({ | |||
name: 'Symphony', | |||
path: process.execPath, | |||
path: isMac ? '/Applications/' + app.getName() + '.app' : process.execPath, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are relying on app being installed is this exact location - which it will but in case it is put elsewhere - couldn't you instead use app.getPath('exe') and figure out from there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By doing that i was facing this issue. Auto launcher verifies the path and if it fails to locate, it will defaults to the exe
path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about this..
var appPath = app.getPath('exe').split('.app/Content')[0] + '.app';
appLauncher = new AutoLaunch({
name: app.getName(),
path: appPath,
});
@lneir Changed the implementation. Please review. Thanks. |
js/menus/menuTemplate.js
Outdated
electron.dialog.showErrorBox(title, title + ': ' + err); | ||
}); | ||
if (isMac){ | ||
childProcess.exec(`launchctl load ${launchAgentPath}`, (err) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we do different work to change how to enable/disable startup for mac? doesn't the auto-launch package work for mac? i thought it should take care of all of this???
https://www.npmjs.com/package/auto-launch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As informed earlier in this ticket there are open issue for MacOS, we've built a custom solution. Please check the ticket here -> issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, then please add documentation here why we are using different soln (i.e., bug in electron and provide ref to bug - so we can track when it gets fixed).
Need to change this custom implementation to use AutoLaunch once this issue is fixed Teamwork/node-auto-launch#28 |
lgtm |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Updated AutoLauncher path to make it work properly in mac osx